package the.workshop.bu.dto.req;

import lombok.Data;
import org.springframework.beans.BeanUtils;
import the.workshop.bu.dto.ProductCondition;

@Data
public class ProductQueryReq {
    private String name;
    private String bankName;
    private String keyword;
    private String orderBy;
    private Integer pageNum = 1;
    private Integer pageSize = 20;

    public ProductCondition toCondition() {
        ProductCondition condition = new ProductCondition();
        BeanUtils.copyProperties(this, condition);
        return condition;
    }
}
